package com.example.qxfw.ybzz.service.impl;

import com.example.qxfw.ybzz.mapper.ThirtyYearTdStaticsMapper;
import com.example.qxfw.ybzz.service.ThirtyYearTdStaticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ThirtyYearTdStaticsServiceImpl implements ThirtyYearTdStaticsService {

    @Autowired
    private ThirtyYearTdStaticsMapper thirtyYearTdStaticsMapper;

    @Override
    public List<Double> getAreaRain(String stationId, String tdIndex) {
        return thirtyYearTdStaticsMapper.getYearAreaTdRain(stationId, Integer.parseInt(tdIndex));
    }

    @Override
    public List<Double> getAreaAvgTemp(String stationID, String tdIndex) {
        return thirtyYearTdStaticsMapper.getYearAreaTdAvgTemp(stationID, Integer.parseInt(tdIndex));
    }
}
